﻿window.addEventListener("load", function(e){
	function selectionOnClick(info) {
		var selectedWord = info.selectionText;
		SinaWeiBo.post_word(selectedWord + "@单词本");
	}
	
	SinaWeiBo.oauth_init();
	
	var context = "selection";
	var title = "把 '%s' 加入我的生词本";
	chrome.contextMenus.create({"type": 'separator'});
	chrome.contextMenus.create({"title": title, "contexts":[context], "onclick": selectionOnClick});
	}, 
false);